<html>
<title>SNUVM 0.2 help contents
</title>
<body>
<center>
<h3>SNUVM - Seoul National University Assembly-executable Virtual Machine</h3>
<h4>Release 0.3</h4>
<h4>February 2010</h4>
<h4>Using SNUVM through its Integrated Development Environment (IDE)</h4>
</center>

The IDE is invoked when SNUVM is run with no command arguments, e.g. <tt>java -jar SNUVM.jar</tt>.
It may also be launched from a graphical interface by double-clicking the <tt>SNUVM.jar</tt> icon
that represents this executable JAR file.
The IDE provides basic editing, assembling and execution capabilities.  Hopefully it
is intuitive to use.  Here are comments on some features.
<ul>
<li><b>Menus and Toolbar</b>: Most menu items have equivalent toolbar icons.
If the function of a toolbar icon is not obvious, just hover the mouse over it and
a tool tip will soon appear.  Nearly all menu items also have keyboard shortcuts.
Any menu item not appropriate in a given situation is disabled.</li>
<li><b>Editor</b>: SNUVM includes a basic text editor.  It supports a single font which
can be modified by selecting Editor from the Settings menu (new in Release 3.3).  
Notice on the bottom border that the cursor line
and column position is maintained and there is a checkbox to show line numbers.
They are displayed outside the editing area.  If you use an external editor, SNUVM provides
a convenience setting that will automatically assemble a file as soon as it is opened.  Check
the Settings menu.
<li><b>Message Areas</b>: There are two tabbed read-only message areas at the
bottom of the screen.  The <i>Run I/O</i> tab is used at runtime for 
displaying console I/O as program execution progresses.  User console input
is typed into a pop-up dialog then echoed to the message area.  
The <i>SNUVM Messages</i> tab is used for other messages such as assembly or
runtime errors and informational messages.
<li><b>ARM9 Registers</b>: ARM9 registers are displayed at all times, even
when you are editing and not running a program.  While writing your program,
this serves as a useful reference for register names and their conventional
uses (hover mouse over the register name to see tool tips).  There are three
register tabs: the Register File (integer registers $0 through $31 plus LO,
HI and the Program Counter), selected Coprocesor 0 registers (exceptions and
interrupts), and Coprocessor 1 floating point registers.

<li><b>Assembly</b>: Select <i>Assemble</i> from the <i>Run</i> menu or the
corresponding toolbar icon to assemble the file currently in the Edit tab.
Prior to Release 0.3, only one file could be assembled and run at a time.
Releases 0.2 and later provide a primitive Project capability.  To use it, go to the
<i>Settings</i> menu and check <i>Assemble operation applies to all 
files in current directory.</i>  Subsequently, the assembler will assemble
the current file as the "main" program and also assemble all other assembly
files (*.asm; *.s)
in the same directory.  The results are linked and if all these 
operations were successful the program can be executed.  Labels that are
declared global with the ".globl" directive may be referenced in any of the
other files in the project.  There is also a setting that permits
automatic loading and assembly of a selected exception handler file.

<li><b>Execution</b>: Once a ARM9 program successfully assembles, the
registers are initialized and three windows
in the Execute tab are filled: <i>Text Segment</i>, <i>Data Segment</i>,
and <i>Program Labels</i>.  The major execution-time features are described below.

<li><b>Labels Window</b>: Display of the Labels window (symbol table) is
controlled through the Settings menu.  When displayed, you can click on any label
or its associated address to center and highlight the contents of that address 
in the Text Segment window or Data Segment window as appropriate
(new in Release 3.3).
</ul>

<p>The assembler and simulator are invoked from the IDE
when you select the <i>Assemble</i>, <i>Go</i>,
or <i>Step</i> operations from the <i>Run</i> menu or their corresponding
toolbar icons or keyboard shortcuts.  SNUVM messages are displayed on the
<i>SNUVM Messages</i> tab of the message area at the bottom of the screen.
Runtime output is displayed on the <i>Run I/O</i> tab.  Runtime input is
entered through a pop-up dialog box then echoed to the <i>Run I/O</i> tab.
<p>
<hr>
<p>
This document is available for printing on the SNUVM home page
<tt><b>http://snuvm.snu.ac.kr/</b></tt>.
</body>
</html>